package com.hxrfid.common.utils;

import org.springframework.http.server.reactive.ServerHttpRequest;

/**
 * 客户端工具类
 *
 * @author hxrfid
 */
public class TenantUtils {

    public static final String TENANT_ID = "tenant_id";

    /**
     * 空租户Id
     */
    public static final Long EMPTY_TENANT_ID = -1l;

    public static String getTenantId(ServerHttpRequest request) {
        return request.getHeaders().getFirst(TenantUtils.TENANT_ID);
    }

}
